package io.adrainty.bolee.insurance.repository.impl;

import cn.hutool.core.bean.BeanUtil;
import io.adrainty.bolee.insurance.mapper.SearchRecordMapper;
import io.adrainty.bolee.insurance.models.bo.SearchRecordBO;
import io.adrainty.bolee.insurance.models.entity.SearchRecordEntity;
import io.adrainty.bolee.insurance.repository.ISearchRecordRepository;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author AdRainty
 * @version V1.0.0
 * @since 2025/8/23 下午4:54
 */

@Repository
public class SearchRecordRepositoryImpl implements ISearchRecordRepository {

    @Resource
    private SearchRecordMapper searchRecordMapper;

    @Override
    public void saveBatch(List<SearchRecordEntity> recordList) {
        List<SearchRecordBO> recordBOList = BeanUtil.copyToList(recordList, SearchRecordBO.class);
        searchRecordMapper.insert(recordBOList);
    }

}
